-- *****************************************************************
-- Juniper-SDX-REDIRECTOR-MIB
--
-- Juniper Networks Inc.
-- *****************************************************************
Juniper-SDX-REDIRECTOR-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY,
    OBJECT-TYPE,
    Integer32,
    Counter32,
    Gauge32,
    IpAddress,
    TimeTicks
        FROM SNMPv2-SMI

    TruthValue,
    RowStatus,
    DisplayString
        FROM SNMPv2-TC

    MODULE-COMPLIANCE,
    OBJECT-GROUP
        FROM SNMPv2-CONF

    SnmpAdminString
        FROM SNMP-FRAMEWORK-MIB

    juniSdxMibs
        FROM Juniper-SDX-MIBS

    JuniSdxCopsOverloadAction
        FROM Juniper-SDX-TC-MIB;

juniSdxRedirectorMib MODULE-IDENTITY
    LAST-UPDATED "200312011200Z"  -- 01-Dec-03

    ORGANIZATION "Juniper Networks, Inc."
    CONTACT-INFO
        "        Juniper Technical Assistance Center
                 Juniper Networks, Inc.
                 1194 N. Mathilda Avenue
                 Sunnyvale, CA 94089
                 E-mail: support@juniper.net"

    DESCRIPTION
        "MIB of the SDX REDIRECTOR "

    REVISION "200312011200Z"  -- 01-Dec-03
    DESCRIPTION
    "First version."

    ::= { juniSdxMibs 9 }

juniSdxMgmtInterface OBJECT IDENTIFIER ::= { juniSdxRedirectorMib 1 }


--
-- Redirector MI IDL
--

    juniSdxRedirectorTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF JuniSdxRedirectorEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
        "Table of Redirector MI-derived entries.

         The redirector maintains a leaky bucket per unique IP address
         in an attempt to rate limit user initiated HTTP requests.
         The 'user' bucket is the rate limiting bucket per user.
         The redirector also maintains one global leaky bucket for
         the whole system.  All HTTP requests will be rejected if
         this global bucket bursts. "
        ::= { juniSdxMgmtInterface 7 }

    juniSdxRedirectorEntry OBJECT-TYPE
        SYNTAX      JuniSdxRedirectorEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
        "A table entry describing Redirector MI.
         The index for this table is: juniSdxRedirIndex.
         The index represents an instance of a Redirector."
        INDEX   { juniSdxRedirIndex }
        ::= { juniSdxRedirectorTable 1 }

    JuniSdxRedirectorEntry ::= SEQUENCE
    {
        juniSdxRedirIndex                      Integer32,
        juniSdxRedirUpTime                     TimeTicks,
        juniSdxRedirAcceptedRequests           Counter32,
        juniSdxRedirRejectedRequests           Counter32,
        juniSdxRedirUBs                        Gauge32,
        juniSdxRedirUBLimitReached             Counter32,
        juniSdxRedirUBDecrement                Integer32, 
        juniSdxRedirUBMax                      Integer32,
        juniSdxRedirGBLimitReached             Counter32,
        juniSdxRedirGBDecrement                Integer32,
        juniSdxRedirGBMax                      Integer32
    }


    juniSdxRedirIndex OBJECT-TYPE
        SYNTAX      Integer32 (0..10000)
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
        "Index for this table."
        ::= { juniSdxRedirectorEntry 1 }

    juniSdxRedirUpTime OBJECT-TYPE
        SYNTAX      TimeTicks
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        " Time since process restart."
        ::= { juniSdxRedirectorEntry 2 }

    juniSdxRedirAcceptedRequests OBJECT-TYPE
        SYNTAX      Counter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The total number of HTTP requests accepted by the redirector.
         Requests are accepted if neither the global nor the per user
         limits are exceeded."
        ::= { juniSdxRedirectorEntry 3 }


    juniSdxRedirRejectedRequests OBJECT-TYPE
        SYNTAX      Counter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The total number of HTTP requests rejected by the redirector.
         Requests are rejected if either the global or the per user
         limits are exceeded."
        ::= { juniSdxRedirectorEntry 4 }

    juniSdxRedirUBs OBJECT-TYPE
        SYNTAX      Gauge32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "Current number of per user limit leaky buckets.  The redirector
         maintains a leaky bucket per unique IP address. Buckets are
         cleaned once per minute, empty buckets are discarded.
         The current number of leaky buckets is an indicator for the
         number of unique IP addresses actively hitting the redirector
         during the current minute."
       ::= { juniSdxRedirectorEntry 5 }

    juniSdxRedirUBLimitReached OBJECT-TYPE
        SYNTAX      Counter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The total number of per user limits reached.  The redirector
         maintains a leaky per unique IP address.  If the leaky bucket
         exceeds its burst size 'juniSdxRedirUBMax', further requests
         will be rejected. This counter maintains the number of times a
         bucket reaches the maximum."
        ::= { juniSdxRedirectorEntry 6 }

    juniSdxRedirUBDecrement OBJECT-TYPE
        SYNTAX      Integer32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The decrement amount for the Request User Bucket. This value is
         decremented from the Request User Bucket every time period (60s)."
        ::= { juniSdxRedirectorEntry 7 }

    juniSdxRedirUBMax OBJECT-TYPE
        SYNTAX      Integer32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "This is the maximum value of each user request bucket.  When the
         bucket reaches this value, user HTTP requests are denied."
        ::= { juniSdxRedirectorEntry 8 }

    juniSdxRedirGBLimitReached OBJECT-TYPE
        SYNTAX      Counter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The total number of times the global bucket limits were reached.
         The redirector maintains one global leaky for all HTTP requests.
         If the leaky bucket exceeds its burst size 'juniSdxRedirGBMax',
         further requests will be rejected. This counter maintains the
         number of times a bucket reaches the maximum."
        ::= { juniSdxRedirectorEntry 9 }

    juniSdxRedirGBDecrement OBJECT-TYPE
        SYNTAX      Integer32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "The decrement amount for the Request Global Bucket. This value
         is decremented from the Request Global Bucket every time period (60s)."
        ::= { juniSdxRedirectorEntry 10 }

    juniSdxRedirGBMax OBJECT-TYPE
        SYNTAX      Integer32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
        "This is the maximum value for the request global bucket.  When
         the bucket reaches this value, all HTTP requests are denied."
        ::= { juniSdxRedirectorEntry 11 }

-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--
-- Conformance information
--
-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

juniSdxRedirectorCompliances OBJECT IDENTIFIER ::= { juniSdxRedirectorMib 2 }
juniSdxRedirectorGroups      OBJECT IDENTIFIER ::= { juniSdxRedirectorMib 3 }

-- compliance statements

juniSdxRedirectorCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the SDX Redirector MIB."
        MODULE  -- this module
                MANDATORY-GROUPS { juniSdxRedirectorGroup }
        ::= { juniSdxRedirectorCompliances 1 }

juniSdxRedirectorGroup OBJECT-GROUP
    OBJECTS {
               juniSdxRedirUpTime,
               juniSdxRedirAcceptedRequests,
               juniSdxRedirRejectedRequests,
               juniSdxRedirUBs,
               juniSdxRedirUBLimitReached,
               juniSdxRedirUBDecrement,
               juniSdxRedirUBMax,
               juniSdxRedirGBLimitReached,
               juniSdxRedirGBDecrement,
               juniSdxRedirGBMax
   }
    STATUS  current
    DESCRIPTION
        "A collection of management objects pertaining
        to system management capabilities in SDX. (REDIRECTOR)"
        ::= { juniSdxRedirectorGroups 1 }
END